package com.pww.movie.domain.PO;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 媒体资源表
 * </p>
 *
 * @author pww
 * @since 2025-06-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("media")
public class Media implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 媒体ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 媒体类型
     */
    private String type;

    /**
     * MinIO访问地址
     */
    private String url;

    /**
     * 标题
     */
    private String title;

    /**
     * 描述信息
     */
    private String description;

    /**
     * 是否为轮播图
     */
    private Boolean isBanner;

    /**
     * 上传用户ID（可选）
     */
    private Long creatorId;

    /**
     * 是否逻辑删除
     */
    private Boolean deleted;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;

    private String coverImage;


}
